package com.mzq.langchain4j_springboot.web.controller;

import com.mzq.langchain4j_springboot.config.AiConfig;
import com.mzq.langchain4j_springboot.web.entity.RentInfo;
import com.mzq.langchain4j_springboot.web.service.RentInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 租赁管理列表
 */
@RestController
@RequestMapping("/system/rentInfo")
public class RentInfoController {

    @Autowired
    private RentInfoService rentInfoService;

    @Autowired
    AiConfig.AssistantUnique assistantUnique;

    @PostMapping("/insertRentInfo")
    public ResponseEntity<Integer> insertRentInfo(RentInfo rentInfo) {
        return ResponseEntity.ok(rentInfoService.insertRentInfo(rentInfo));
    }

    @PutMapping("/updateRentInfo")
    public ResponseEntity<Integer> updateRentInfo(RentInfo rentInfo) {
        return ResponseEntity.ok(rentInfoService.updateRentInfo(rentInfo));
    }

}
